package com.netcracker.util.dao;

import com.netcracker.db.exception.DBException;
import com.netcracker.db.DBManager;
import com.netcracker.entity.Author;
import com.netcracker.entity.record.AuthorRecord;

import java.util.List;

public interface AuthorDAO {

    public void setDBManager(DBManager dbManager);
    
    public void setDAOFacade(DAOFacade daoFacade);
    
    public void create(AuthorRecord author) throws DBException;

    public void edit(AuthorRecord author) throws DBException;

    public void remove(int id) throws DBException;

    public Author find(int id) throws DBException;

    public List<Author> findAuthorByName(String name) throws DBException;

    public List<Author> findAll() throws DBException;
    
    public List<Author> findBookAuthors(int bookID) throws DBException;

    public int count() throws DBException;

    public List<Integer> getBookAuthorsIds(int bookId) throws DBException;
    
}
